<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="template.xhtml">
	<ui:define name="body">
		<f:view>
			<h:form id="form1">
				<rich:panel id="pnl_contactDetails" width="400">
					<f:facet name="header">
						<h:outputText value="Contact Details" />
					</f:facet>
					<h:panelGrid columns="3">
					    <h:outputText value="Name" />
					    <h:inputText id="input_name" value="#{addressBookController.contact.name}">
					    	<rich:ajaxValidator event="onblur" />
					    </h:inputText>
						<rich:message for="input_name"  />					    
					    <h:outputText value="Email" />
					    <h:inputText id="input_email" value="#{addressBookController.contact.email}">
					    	<rich:ajaxValidator event="onblur" />
					    </h:inputText>
						<rich:message for="input_email" />					    
					    <rich:spacer />
					    <a4j:commandButton value="Go" action="#{addressBookController.addContact}" reRender="pnl_contactDetails" />
					    <rich:spacer />
					</h:panelGrid>			
				</rich:panel>
			</h:form>
		</f:view>		
	</ui:define>
</ui:composition>